/**
 * Copyright 2021 Solomon. All rights reserved.
 * Date : 2021.03.24
 */

#define MGD_NEWLINE (2)
#define MGD_HEADER  (18*(1+8+MGD_NEWLINE))
#define FW_PARTINFO (8*(1+8+MGD_NEWLINE))

typedef struct _FWPart
{
    unsigned int write_address;
    unsigned int byte_cnt;
    unsigned short int erase_cnt;
    unsigned int version;
    unsigned int check_sum;
    unsigned int rsvd01;
    unsigned int rsvd02;
    unsigned int rsvd03;
    unsigned char content[256];
} _FWPart_;

typedef struct _FWInfo
{
    uint8_t total_part_num;
    uint8_t order[6];
    uint32_t FW_Offset[6];
} _FWInfo_;

extern struct _FWPart FW_Part[6];
extern struct _FWInfo FWInfo;

int SPD2010_MGD_Parse(void);

